/**
 * Created by Delicate on 2017/5/31.
 */
let layer;
require(["jquery","common","layer"],(a,b,c)=>{
	layer =c;
	init();
    monitor();
    service();
})
const init = ()=>{
	$(".u-btn-logout").on("click",()=>{
		console.log(layer);
		layer.confirm("确定要退出当前系统吗？", {
            btn: ['确定','取消'] //按钮
        }, function(){
        	location.href=contextPath+'/logout'
        },function(){
        	layer.close();
        });
//		var result = confirm("确定要退出当前系统吗？");
//		if(result){
//			location.href=contextPath+'/logout'
//		}
    });
}
const monitor = ()=>{
    $(".u-switch").on("click",()=>{
        $(".g-nav").toggleClass("g-nav-hide");
    })
    $(".g-nav .m-item").on("click",function(){
        $(this).addClass("m-item-active").siblings().removeClass("m-item-active");
        $(".g-article .g-article-iframe").attr("src",$(this).data("href"));
    });
}
const service = ()=>{

}

